<!DOCTYPE html>
<html>
<head>
  <script src="jquery-1.4.4.min.js"></script>
  <script src="jquery.tmpl.min.js"></script>
  <script>
  $(document).ready(function(){
	  var movies = [
          { Name: "The Red Violin", ReleaseYear: "1998" },
          { Name: "Eyes Wide Shut", ReleaseYear: "1999" },
          { Name: "The Inheritance", ReleaseYear: "1976" }
      ];

      /* Render the template with the movies data and insert
         the rendered HTML under the "movieList" element */
	  var extProperties = {
		  age: function(){
			  var yearReleased = this.data.ReleaseYear;
			  var yearCurrent = (new Date()).getFullYear();
			  return yearCurrent-yearReleased + ' years old';
		  },
		  actors: ['I','You','She']
	  };
      $( "#movieTemplate").tmpl(movies,extProperties).appendTo( "#movieList" );	  
  });  
  </script>
  
</head>
<body>
  
<script id="movieTemplate" type="text/x-jquery-tmpl"> 
    <li><b>${Name}</b> ${ReleaseYear} -> ${$item.actors[1]} -> ${$item.age()} </li>
</script>

<ul id="movieList"></ul>

<script>

</script>
</body>
</html>